
#include "stdio.h"
#include "stdlib.h"





int main()
{

   

    char name[] = "/kbd.dev";
    uint64_t fd = open(name,0);
    

    currentDir =  "/";

    uint8_t buf[256] = {0};

    int index = 1;

    static count = 0;
    
    while(1){

        count++;
        int argc = 0;

        char** argv = NULL;

        printf("[SHELL]#:");
        
        memset(buf,0,256);

        readLine(fd,buf);
        printf("\n");

        index = parseCommand(buf,&argc,&argv);
        
        if(index < 0)
            printf("input error,no command found!\n");
        else
            run_command(index,argc,argv);
        

    }



    
    close(fd);
    
   

    while(1);

    return 0;

}